.PHONY: clean

app: b.c app.c
	gcc -fPIC -shared -Wl,--version-script=b.lds,-Tld.lds  b.c -o libb.so
	gcc app.c -o app -L. -l b #-Wl,-Tld.lds,-N  
	nm app > app.nm
	nm libb.so > libb.so.nm

run: app
	LD_LIBRARY_PATH=. ./app

clean:
	rm -f *.so *.out app *.nm 